package com.assistant.framework;

import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.PostConstruct;
import javax.persistence.EntityManager;

/**
 * BaseRepository
 *
 * @author yingjianhua
 */
public abstract class BaseRepository {

    @Autowired
    private EntityManager em;

    protected JPAQueryFactory queryFactory;

    @PostConstruct
    public void init() {
        queryFactory = new JPAQueryFactory(em);
    }
}
